interface Todo {
  title: string;
  completed: boolean;
  description: string;
}

let todolist: Todo[] = [
  {
    title: '标题1',
    completed: true,
    description: '标题1的描述',
  },
  {
    title: '标题2',
    completed: false,
    description: '标题的描述',
  },
];

type type2 = Pick<Todo, 'title' | 'completed'>;
type Record<T> = {
  [P in keyof any]: T;
};
type todoRecord = Record<type2>;
let todoRecordList: todoRecord = {};
todolist.map((todo) => {
  todoRecordList[todo['title']] = todo;
});
console.log(todoRecordList);

export {};
